<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the list of mailboxes that matches the given text</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.imap-listmailbox.html">« imap_listmailbox</a></li>
      <li style="float: right;"><a href="function.imap-listsubscribed.html">imap_listsubscribed »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.imap.html">IMAP 函数</a></li>
    <li>Returns the list of mailboxes that matches the given text</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.imap-listscan" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_listscan</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imap_listscan</span> &mdash; <span class="dc-title">Returns the list of mailboxes that matches the given text</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-listscan-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imap_listscan</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type IMAP\Connection">IMAP\Connection</span></span> <code class="parameter">$imap</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$reference</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$pattern</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$content</code></span><br>): <span class="type"><span class="type">array</span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   Returns an array containing the names of the mailboxes that have
   <code class="parameter">content</code> in the text of the mailbox.
  </p>
  <p class="para">
   This function is similar to <span class="function"><a href="function.imap-listmailbox.html" class="function">imap_listmailbox()</a></span>,
   but it will additionally check for the presence of the string
   <code class="parameter">content</code> inside the mailbox data.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imap-listscan-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    <dt>

<code class="parameter">imap</code></dt>
<dd>
<p class="para"><span class="classname"><strong class="classname">IMAP\Connection</strong></span> 实例。</p></dd>

    
     <dt>
<code class="parameter">reference</code></dt>

     <dd>

      <p class="para">
       <code class="parameter">reference</code> should normally be just the server 
       specification as described in <span class="function"><a href="function.imap-open.html" class="function">imap_open()</a></span>
      </p>
      <div class="warning"><strong class="warning">警告</strong><p class="simpara">
Passing untrusted data to this parameter is <em class="emphasis">insecure</em>, unless
<a href="imap.configuration.html#ini.imap.enable-insecure-rsh" class="link">imap.enable_insecure_rsh</a> is disabled.
</p></div>
     </dd>

    
    
     <dt>
<code class="parameter">pattern</code></dt>

     <dd>

      <p class="para">指定在邮箱层级的何处开始查找。</p>
<p class="para">在组成 <code class="parameter">pattern</code> 的字符中可使用两个特殊字符：
 &#039;<code class="literal">*</code>&#039; 和 &#039;<code class="literal">%</code>&#039;。
 &#039;<code class="literal">*</code>&#039; 是指返回所有邮箱目录. 如果将 &#039;<code class="literal">*</code>&#039; 作为
 <code class="parameter">pattern</code> 参数时, 则会返回整个邮箱层级结构。
 &#039;<code class="literal">%</code>&#039; 是指只返回当前级次。
 &#039;<code class="literal">%</code>&#039; 作为 <code class="parameter">pattern</code> 参数则只会返回顶层邮箱；
 &#039;<code class="literal">~/mail/%</code>&#039; 用于 <code class="literal">UW_IMAPD</code>
 则会返回名为 <var class="filename">~/mail</var> 的目录, 但不包含其子目录。</p>
     </dd>

    
    
     <dt>
<code class="parameter">content</code></dt>

     <dd>

      <p class="para">
       The searched string
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-listscan-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an array containing the names of the mailboxes that have
   <code class="parameter">content</code> in the text of the mailbox,  或者在失败时返回 <strong><code>false</code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imap-listscan-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  现在 <code class="parameter">imap</code> 参数接受 <span class="classname"><strong class="classname">IMAP\Connection</strong></span>
  实例，之前接受 <a href="language.types.resource.html" class="link">资源(resource)</a>。
 </td>
</tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.imap-listscan-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.imap-listmailbox.html" class="function" rel="rdfs-seeAlso">imap_listmailbox()</a> - 别名 imap_list</span></li>
    <li class="member"><span class="function"><a href="function.imap-search.html" class="function" rel="rdfs-seeAlso">imap_search()</a> - This function returns an array of messages matching the given search criteria</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>